--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit d2c2d7a02bdcb30630892684ed3395e1fbef27b7
Parents : 7555d95
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-01-01T21:57:05-06:00
chore(android): update Gradle dependencies, adjust Python build path, and enhance AndroidManifest with drawable resources
Changes
10 files changed, 71 insertions(+), 29 deletions(-)
Diff
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 2506db1c..d33c4460 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -15,6 +15,9 @@ android {
versionName "3.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ ndk {
+ abiFilters "arm64-v8a", "x86_64"
+ }
}
buildTypes {
@@ -39,30 +42,20 @@ android {
chaquopy {
defaultConfig {
version = "3.11"
- buildPython "python3.11"
+ buildPython "/usr/bin/python3.11"
pip {
- install "aiohttp>=3.13.2"
- install "lxmf>=0.9.3"
+ install "aiohttp==3.10.10"
install "psutil>=7.1.3"
- install "rns>=1.0.4"
install "websockets>=15.0.1"
- install "bcrypt>=5.0.0,<6.0.0"
+ install "bcrypt==3.1.7"
install "aiohttp-session>=2.12.1,<3.0.0"
- install "cryptography>=46.0.3,<47.0.0"
+ install "cryptography==42.0.8"
install "requests>=2.32.5,<3.0.0"
- install "lxst>=0.4.5,<0.5.0"
+ install "numpy==1.26.2"
install "ply>=3.11,<4.0"
}
}
-
- sourceSets {
- main {
- python {
- srcDirs = ["src/main/python"]
- }
- }
- }
}
dependencies {
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index c354e672..fd5f5efe 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -12,9 +12,9 @@
<application
android:name="com.chaquo.python.android.PyApplication"
android:allowBackup="true"
- android:icon="@mipmap/ic_launcher"
+ android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
- android:roundIcon="@mipmap/ic_launcher_round"
+ android:roundIcon="@drawable/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MeshChatX"
android:usesCleartextTraffic="true"
diff --git a/android/app/src/main/java/com/meshchatx/MainActivity.java b/android/app/src/main/java/com/meshchatx/MainActivity.java
index 4374bc82..887bbfd0 100644
--- a/android/app/src/main/java/com/meshchatx/MainActivity.java
+++ b/android/app/src/main/java/com/meshchatx/MainActivity.java
@@ -13,7 +13,7 @@ import com.chaquo.python.android.AndroidPlatform;
public class MainActivity extends AppCompatActivity {
private WebView webView;
private ProgressBar progressBar;
- private static final String SERVER_URL = "http://127.0.0.1:8000";
+ private static final String SERVER_URL = "https://127.0.0.1:8000";
private static final int SERVER_PORT = 8000;
@SuppressLint("SetJavaScriptEnabled")
@@ -49,6 +49,13 @@ public class MainActivity extends AppCompatActivity {
super.onPageStarted(view, url, favicon);
progressBar.setVisibility(android.view.View.VISIBLE);
}
+
+ @SuppressLint("WebViewClientOnReceivedSslError")
+ @Override
+ public void onReceivedSslError(WebView view, android.webkit.SslErrorHandler handler, android.net.http.SslError error) {
+ // Ignore SSL certificate errors for localhost
+ handler.proceed();
+ }
});
startMeshChatServer();
diff --git a/android/app/src/main/python/meshchat_wrapper.py b/android/app/src/main/python/meshchat_wrapper.py
index 7882f304..d625c6a7 100644
--- a/android/app/src/main/python/meshchat_wrapper.py
+++ b/android/app/src/main/python/meshchat_wrapper.py
@@ -8,8 +8,7 @@ def start_server(port=8000):
'meshchat',
'--headless',
'--host', '127.0.0.1',
- '--port', str(port),
- '--no-https'
+ '--port', str(port)
]
main()
diff --git a/android/app/src/main/res/drawable/ic_launcher.xml b/android/app/src/main/res/drawable/ic_launcher.xml
new file mode 100644
index 00000000..2050bbc7
--- /dev/null
+++ b/android/app/src/main/res/drawable/ic_launcher.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path
+ android:fillColor="#3D5AFE"
+ android:pathData="M0,0h108v108h-108z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M30,30h48v48h-48z" />
+</vector>
+
diff --git a/android/app/src/main/res/drawable/ic_launcher_foreground.xml b/android/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 00000000..2050bbc7
--- /dev/null
+++ b/android/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path
+ android:fillColor="#3D5AFE"
+ android:pathData="M0,0h108v108h-108z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M30,30h48v48h-48z" />
+</vector>
+
diff --git a/android/app/src/main/res/drawable/ic_launcher_round.xml b/android/app/src/main/res/drawable/ic_launcher_round.xml
new file mode 100644
index 00000000..fe901a43
--- /dev/null
+++ b/android/app/src/main/res/drawable/ic_launcher_round.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path
+ android:fillColor="#3D5AFE"
+ android:pathData="M54,54m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M30,30h48v48h-48z" />
+</vector>
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..4f0f28e9
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/purple_500"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon>
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..4f0f28e9
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/purple_500"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon>
+
diff --git a/android/build.gradle b/android/build.gradle
index 15563854..a21ca34c 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,15 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.3'
- classpath "com.chaquo.python:gradle:15.0.1"
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- maven { url "https://chaquo.com/maven" }
+ classpath "com.chaquo.python:gradle:16.1.0"
}
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────